<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="init.js"></script>
<script>
var huati = '#Chrome分享#';

chrome.contextMenus.create({title:'分享内容',contexts:['selection'],onclick:function(text){
	var u = bulid_post_url(text.selectionText , text.pageUrl , null);
	chrome.tabs.create({ 'url': u });
}});
chrome.contextMenus.create({title:'分享图片',contexts:['image'],onclick:function(image){
	chrome.tabs.getSelected(null , function(tab){
		var u = bulid_post_url(tab.title , tab.url , image.srcUrl);
		chrome.tabs.create({ 'url': u });
	});
}});
chrome.contextMenus.create({title:'分享页面',contexts:['page'],onclick:function(page){
	chrome.tabs.getSelected(null , function(tab){
		var u = bulid_post_url(tab.title , tab.url , null);
		chrome.tabs.create({ 'url': u });
	});
}});

fetchWeiboFeed();
setInterval('fetchWeiboFeed()',3000);

</script>
</head>
<body>
</body>
</html>